package com.sgsg.statemodule;

import android.util.Log;

class EveningState extends State {
    @Override
    public void writeProgram(Work w) {
        Log.i("tag","工作是否完成:"+w.isTaskFinished());
        if(w.isTaskFinished()){
            w.setState(new RestState());
            w.writeProgram();
        }else{
            if(w.getHour()<21){
                Log.i("tag","当前时间___"+w.getHour()+"加班---，十分辛苦疲惫");
            }else{
                w.setState(new SleepState());
                w.writeProgram();
            }
        }
    }
}
